﻿@model Services.Schedules
@{
    ViewBag.Title = "ScheduleInfo";
    Layout = "~/_Layout.cshtml";
}
<style type="text/css">
    .schedule_content {
        width: 400px;
        height: 100px;
    }
</style>
<h2>MyPeddingScheduleInfo</h2>
<div id="div_content">
    <table class="tab">
        <tr>
            <td colspan="2" style="font-weight:bold">查看我的已提交计划</td>
        </tr>
        <tr>
            <td>标题:</td>
            <td>@Html.TextBoxFor(p => p.Title)</td>
        </tr>
        <tr>
            <td>提交内容:</td>
            <td>
                @Html.TextAreaFor(p => p.Contents, new { @class = "schedule_content" })
            </td>
        </tr>
        <tr>
            <td>提交时间:</td>
            <td>
                @Html.TextBoxFor(p => p.BeginDate)
            </td>
        </tr>
        <tr>
            <td>发送人:</td>
            <td>
                @Html.TextBoxFor(p => p.SendUid)
            </td>
        </tr>
        <tr>
            <td>审核人:</td>
            <td>
                @Html.TextBoxFor(p => p.ApproveUid)
            </td>
        </tr>
        <tr>
            <td>审核内容:</td>
            <td>
                @Html.TextAreaFor(p => p.ApproveContent, new { @class = "schedule_content" })
            </td>
        </tr>
        <tr>
            <td>审核时间:</td>
            <td>
                @Html.TextBoxFor(p => p.ApproveDate)
            </td>
        </tr>
        <tr>
            <td>状态:</td>
            <td>
                @Html.TextBoxFor(p => p.Status)
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" value="返回" id="btn_back" class="btn" />
            </td>
        </tr>
    </table>
</div>
<script type="text/javascript">

    $(function () {
        $("#div_content input[type=text]").each(function () {
            $(this).attr("readonly", "readonly");
        })

        $("#div_content textarea").each(function () {
            $(this).attr("readonly", "readonly");
        })

        var v = $("#Status").val();
        if (v == "0") {
            $("#Status").val("未提交");
        }
        if (v == "1") {
            $("#Status").val("已提交，未审核");
        }
        if (v == "2") {
            $("#Status").val("已完成");
        }
    })

    var tag = '@ViewData["tag"].ToString()'
    if (tag == "pedding") {
        $("#ApproveContent").parent().parent().css("display", "none");
        $("#ApproveDate").parent().parent().css("display", "none");
    }
    if (tag == "finish") {

    }

    $("#btn_back").click(function () {
        var url = '@Url.Action("MyScheduleList","Schedule")'

        window.location.href = url;
    })
</script>
